const moveEvent = function (event, updata, end) {
    var disX = event.pageX;
    var disY = event.pageY;
    document.onmousemove = function (event) {
        event.preventDefault();
        var left = event.pageX - disX;
        var top = event.pageY - disY;
        updata(left, top, event);
    }
    document.onmouseup = function (e) {
        end && end(e);
        document.onmousemove = null;
        document.onmouseup = null;
    }
};
export default moveEvent;